// eslint-disable-next-line
import { UserLayout, BasicLayout, BlankLayout } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

const RouteView = {
  name: 'RouteView',
  render: h => h('router-view')
}

export const asyncRouterMap = [
  {
    path: '/',
    name: 'home',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: 'home-Page',
    children: [
      {
        name: 'homePage',
        path: '/home-Page',
        redirect: '/home-Page',
        meta: { title: '首页', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'homePage',
            path: '/home-Page',
            meta: { title: '首页', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/homePage'),
          }
        ]
      },
      {
        name: 'commodityManagement',
        path: '/commodity-Management',
        redirect: '/home-Page',
        meta: { title: '商品管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'commodityManagement',
            path: '/commodity-Management',
            meta: { title: '普通商品', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/commodityManagement/generalMerchandise'),
          },
          {
            name: 'generalMerchandise',
            path: '/general-Merchandise',
            meta: { title: '推荐商品', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/commodityManagement/recommendingCommodities'),
          },
          {
            name: 'flashsaleofGoods',
            path: '/flashsaleof-Goods',
            meta: { title: '秒杀商品', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/commodityManagement/flashsaleofGoods'),
          },
          {
            name: 'newPeopleGoods',
            path: '/newPeople-Goods',
            meta: { title: '新人专享商品', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/commodityManagement/newPeopleGoods'),
          },
          {
            name: 'oldPeopleGoods',
            path: '/oldPeople-Goods',
            meta: { title: '老用户专享商品', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/commodityManagement/oldPeopleGoods'),
          },
          {
            name: 'groupGoods',
            path: '/group-Goods',
            meta: { title: '拼团活动', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/commodityManagement/groupGoods'),
          },
          {
            name: 'bargainingGoods',
            path: '/bargaining-Goods',
            meta: { title: '砍价商品', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/commodityManagement/bargainingGoods'),
          }
        ]
      },
      {
        name: 'serviceManagement',
        path: '/service-Management',
        redirect: '/Service-Management',
        meta: { title: '服务管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'serviceManagement',
            path: '/service-Management',
            meta: { title: '服务列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/serviceManagement'),
          }
        ]
      },
      {
        name: 'couponManagement',
        path: '/coupon-Management',
        redirect: '/Service-Management',
        meta: { title: '优惠卷管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'couponManagement',
            path: '/coupon-Management',
            meta: { title: '优惠卷列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/couponManagement'),
          }
        ]
      },
      {
        name: 'orderManagement',
        path: '/order-Management',
        redirect: '/Service-Management',
        meta: { title: '订单管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'orderManagement',
            path: '/order-Management',
            meta: { title: '订单列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/orderManagement/orderList'),
          },
          {
            name: 'doctorOrders',
            path: '/doctor-Orders',
            meta: { title: '医生订单', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/orderManagement/doctorOrders'),
          }
        ]
      },
      {
        name: 'storeManagement',
        path: '/store-Management',
        redirect: '/Service-Management',
        meta: { title: '店铺管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'storeManagement',
            path: '/store-Management',
            meta: { title: '店铺列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/storeManagement/storeList'),
          },
          {
            name: 'ListofBeauticians',
            path: '/Listof-Beauticians',
            meta: { title: '美容师列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/storeManagement/ListofBeauticians'),
          },
          {
            name: 'businessListings',
            path: '/business-Listings',
            meta: { title: '商家列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/storeManagement/businessListings'),
          },
          {
            name: 'storereviewList',
            path: '/storereview-List',
            meta: { title: '商家审核列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/storeManagement/storereviewList'),
          }
        ]
      },
      {
        name: 'userManagement',
        path: '/user-Management',
        redirect: '/user-Management',
        meta: { title: '用户管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'userManagement',
            path: '/user-Management',
            meta: { title: '用户列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/userManagement/userList'),
          }
          // {
          //   name: 'groundPromotionManagement',
          //   path: '/groundPromotion-Management',
          //   meta: { title: '地推管理', icon: 'user' },
          //   //  hideChildrenInMenu: true,
          //   component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/userManagement/groundPromotionManagement'),
          // }
        ]
      },
      {
        name: 'doctorManagement',
        path: '/doctor-Management',
        redirect: '/doctor-Management',
        meta: { title: '医生管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'doctorManagement',
            path: '/doctor-Management',
            meta: { title: '医生列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/doctorManagement/doctorList'),
          },
          {
            name: 'doctorReviewlist',
            path: '/doctor-Reviewlist',
            meta: { title: '医生审核列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/doctorManagement/doctorReviewlist'),
          }
        ]
      },
      {
        name: 'financialManagement',
        path: '/financia-lManagement',
        redirect: '/financia-lManagement',
        meta: { title: '财务管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'financialManagement',
            path: '/financia-lManagement',
            meta: { title: '支付记录', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/financialManagement/paymentRecords'),
          },
          {
            name: 'withdrawalManagement',
            path: '/withdrawal-Management',
            meta: { title: '提现管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/financialManagement/withdrawalManagement'),
          },
          {
            name: 'definiteandDetailed',
            path: '/definiteand-Detailed',
            meta: { title: '商家收支明细', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/financialManagement/definiteandDetailed'),
          }
        ]
      },
      {
        name: 'dynamicManagement',
        path: '/dynamic-Management',
        redirect: '/financia-lManagement',
        meta: { title: '动态管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          // {
          //   name: 'dynamicManagement',
          //   path: '/dynamic-Management',
          //   meta: { title: '用户管理', icon: 'user' },
          //   //  hideChildrenInMenu: true,
          //   component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/dynamicManagement/userAdministration'),
          // },
          // {
          //   name: 'content',
          //   path: '/content',
          //   meta: { title: '内容管理', icon: 'user' },
          //   //  hideChildrenInMenu: true,
          //   component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/dynamicManagement/content'),
          // },
          {
            name: 'trends',
            path: '/trends',
            meta: { title: '动态', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/dynamicManagement/trends'),
          },
          // {
          //   name: 'reportingManagement',
          //   path: '/reporting-Management',
          //   meta: { title: '举报管理', icon: 'user' },
          //   //  hideChildrenInMenu: true,
          //   component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/dynamicManagement/reportingManagement'),
          // },
          {
            name: 'commentManagement',
            path: '/comment-Management',
            meta: { title: '评论管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/dynamicManagement/commentManagement'),
          }
        ]
      },
      {
        name: 'petList',
        path: '/pet-List',
        redirect: '/pet-List',
        meta: { title: '宠物管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'petList',
            path: '/pet-List',
            meta: { title: '宠物列表', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/petList'),
          },

        ]
      },
      {
        name: 'systemManagement',
        path: '/system-Management',
        redirect: '/system-Management',
        meta: { title: '系统管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'systemManagement',
            path: '/system-Management',
            meta: { title: '平台用户', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/systemManagement/platformUsers'),
          },
          {
            name: 'roleManagement',
            path: '/role-Management',
            meta: { title: '角色管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/systemManagement/roleManagement'),
          },
          {
            name: 'feedback',
            path: '/feed-back',
            meta: { title: '意见反馈', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/systemManagement/feedback'),
          },
          {
            name: 'frequentlyAskedQuestion',
            path: '/frequently-AskedQuestion',
            meta: { title: '常见问题', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/systemManagement/frequentlyAskedQuestion'),
          },
          {
            name: 'messageManagement',
            path: '/message-Management',
            meta: { title: '消息管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/systemManagement/messageManagement'),
          },

        ]
      },
      {
        name: 'basicSettings',
        path: '/basic-Settings',
        redirect: '/basic-Settings',
        meta: { title: '基础设置', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'basicSettings',
            path: '/basic-Settings',
            meta: { title: '分类', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/basicSettings/classification'),
          },
          {
            name: 'petSection',
            path: '/pet-Section',
            meta: { title: '宠物类目', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/basicSettings/petSection'),
          },
          {
            name: 'platformInformation',
            path: '/platform-Information',
            meta: { title: '平台信息', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/basicSettings/platformInformation'),
          },
          // {
          //   name: 'addzd',
          //   path: '/addzd',
          //   meta: { title: '新增字典', icon: 'user' },
          //   //  hideChildrenInMenu: true,
          //   component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/addzd/index'),
          // },
          {
            name: 'dataType',
            path: '/data-type',
            meta: { title: '数据字典', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/basicSettings/dataType'),
          },
          {
            name: 'timeSetting',
            path: '/timeSetting',
            meta: { title: '秒杀时段管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/timeSetting/index'),
          },
          {
            name: 'meun',
            path: '/meun',
            meta: { title: '小程序/app栏目管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/meun/index')
          },
          {
            name: 'role',
            path: '/role',
            meta: { title: '系统角色', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/role/index')
          },
          {
            name: 'bannerContent',
            path: '/banner-Content',
            meta: { title: 'banner管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/basicSettings/bannerContent'),
          },
          {
            name: 'examination',
            path: '/examination',
            meta: { title: '用药自查', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/examination/examination'),
          }
        ]
      },
      {
        name: 'whatCaneat',
        path: '/what-Caneat',
        redirect: '/what-Caneat',
        meta: { title: '什么能吃', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'whatCaneat',
            path: '/what-Caneat',
            meta: { title: '食物分类', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/whatCaneat/whatCaneatType'),
          },
          {
            name: 'catConent',
            path: '/cat-Conent',
            meta: { title: '内容管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/whatCaneat/catConent/index'),
          },

        ]
      },
      {
        name: 'whatCanBeDone',
        path: '/what-CanBeDone',
        redirect: '/what-CanBeDone',
        meta: { title: '什么能做', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'whatCanBeDone',
            path: '/what-CanBeDone',
            meta: { title: '行为管理分类', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/whatCanBeDone/whatCanBeDoneType'),
          },
          {
            name: 'doConent',
            path: '/do-Conent',
            meta: { title: '内容管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/whatCanBeDone/doContent/index'),
          },


        ]
      },{
        name: 'diseaseExamination',
        path: '/disease-Examination',
        redirect: '/disease-Examination',
        meta: { title: '疾病自查', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'diseaseType',
            path: '/disease-Type',
            meta: { title: '分类管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/diseaseExamination/diseaseType'),
          },
          {
            name: 'diseaseContent',
            path: '/disease-Content',
            meta: { title: '内容管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/diseaseExamination/diseaseContent'),
          },


        ]
      },
      {
        name: 'promotionCode',
        path: '/promo-tionCode',
        redirect: '/promo-tionCode',
        meta: { title: '推广码管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'createPromotional',
            path: '/create-promotional',
            meta: { title: '创建推广码', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/promotionCode/createPromotional'),
          },
          {
            name: 'promotionCode',
            path: '/promo-tionCode',
            meta: { title: '推广码统计', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/promotionCode/promotionCodeAll'),
          },


        ]
      },
      // {
      //   name: 'examination-of-medication',
      //   path: '/examination-of-medication',
      //   redirect: '/examination-of-medication',
      //   meta: { title: '用药自查', menu: 'personal', icon: 'user' },
      //   component: RouteView,
      //   children: [
      //
      //   ]
      // },
      {
        name: 'pointsManagement',
        path: '/points-Management',
        redirect: '/points-Management',
        meta: { title: '积分管理', menu: 'personal', icon: 'user' },
        component: RouteView,
        children: [
          {
            name: 'pointsManagement',
            path: '/points-Management',
            meta: { title: '积分设置', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/pointsManagement/integralSettings'),
          },
          {
            name: 'awardPointSystem',
            path: '/awardPoint-System',
            meta: { title: '积分管理', icon: 'user' },
            //  hideChildrenInMenu: true,
            component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/pointsManagement/awardPointSystem'),
          },

        ]
      },

      // {
      //   name: 'PersonalCenter',
      //   path: '/personal-center',
      //   redirect: '/user-info/basic-setting',
      //   meta: { title: '个人中心', menu: 'personal' },
      //   component: RouteView,
      //   children: [
      //     {
      //       name: 'UserInfo',
      //       path: '/user-info/basic-setting',
      //       meta: { title: '个人信息', icon: 'user' },
      //       //  hideChildrenInMenu: true,
      //       component: () => import(/* webpackChunkName: "UserInfo" */ '@/views/personal-center/UserInfo'),
      //       //   children: [
      //       //   {
      //       //     name: 'BasicSettings',
      //       //     path: 'basic-setting',
      //       //     meta: { title: '基本设置', icon: 'setting' },
      //       //     component: () => import('@/views/personal-center/BasicInfo')
      //       //   },
      //       //   {
      //       //     name: 'SecuritySettings',
      //       //     path: 'security',
      //       //     meta: { title: '安全设置', icon: 'setting' },
      //       //     component: () => import('@/views/personal-center/SafetySetting')
      //       //   }
      //       // ]
      //     }
      //   ]
      // },
    ]
  },

  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        meta: { title: '登录' },
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
      },
      {
        path: 'register-result',
        name: 'registerResult',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
      },
      {
        path: 'recover',
        name: 'recover',
        component: undefined
      }
    ]
  },

  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  },
  {
    path: '/NOpermissions',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/nopermissions')
  }
]
